package com.cy.pj.sys.dao;

import com.cy.pj.sys.entity.SysUser;
import com.cy.pj.sys.entity.SysUserDeptVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface SysUserDao {
    // 分页查询一：
    List<SysUserDeptVo> findPageObjects(@Param("username") String username,
                                        @Param("startIndex") Integer startIndex,
                                        @Param("pageSize") Integer pageSize);

    // 分页查询二：
    List<SysUserDeptVo> findPageObjects2(String name);

    int getRowCount(String username);

    int validById(@Param("id") Integer id,
                  @Param("valid") Integer valid,
                  @Param("modifiedUser") String modifiedUser);

    int insertObject(SysUser entity);

    SysUserDeptVo findObjectById(Integer id);

    int updateObject(SysUser entity);

    SysUser findUserByUserName(String username);

    int updatePassword(String password, String salt, Integer id, String modifiedUser);
}
